define([
  ELMP.resource('components/vxe-ui-plugin/index.js', 'lib'),
  ELMP.resource('components/vxe-table/setup.js', 'lib'),
  ELMP.resource('filters/index.js', 'lib'),
], function (VXETablePluginElement, setup, filters) {
  'use strict';
  function init(VXETable) {
    VXETable.use(VXETablePluginElement)
    VXETable.setup(setup)
    Object.keys(filters).forEach(key => {
      VXETable.formats.add(key, ({ cellValue }, ...rest) => {
        return filters[key](cellValue, ...rest)
      })
    })
  }
  return {
    init: init
  }
});